import CONSTANT from '@/common/constants.js';
import http from '@/common/http.js';
export default {
  name: 'event201901',
  components: {},
  data() {
    return {
      bgHeight: document.body.clientWidth / (640 / 445) + 50,
      stepsScale: document.body.clientWidth / 640,
      shiftY: 0,
      obj: {}
    }
  },
  mounted() {
    const stepsContainer = this.$el.querySelector('.steps'),
      stepsContainerHeight = stepsContainer.clientHeight

    this.stepsContainerHeight = stepsContainerHeight
    this.shiftY = stepsContainerHeight * this.stepsScale - stepsContainerHeight

    const userId = window.sessionStorage.getItem('userId')
    http.post(CONSTANT.JOURNEY, { userId }, (res) => {
      if (res.code == 200) {
        this.obj = res.obj
      }
    })
  },
  methods: {
  },
  computed: {
    stepContainerStyle() {
      return {
        transform: 'scale(' + this.stepsScale + ')',
        transformOrigin: '0 0'
      }
    }
  }
}
